<ol class="breadcrumb">
  <li><a href="{:url('index')}">首页</a></li>
  <li><a href="{:url('category')}">商品分类</a></li>
  <li class="active">添加分类</li>
</ol>
<div class="panel panel-default">
  <div class="panel-body">
    <form class="form-horizontal" method="post" enctype="multipart/form-data">
      <div class="form-group">
        <label for="cname" class="col-sm-1 control-label">分类名称:</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="name" name="cname" placeholder="分类名称如 手机/数码/通讯">
        </div>
      </div>
      <div class="form-group">
        <label for="short_name" class="col-sm-1 control-label">分类别名:</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="short_name" name="short_name" placeholder="如手机数码">
        </div>
      </div>
      <div class="form-group">
        <label for="pid" class="col-sm-1 control-label">上级分类:</label>
        <div class="col-sm-3">
            <select class="form-control" name="pid">
              <option value="0">顶级分类</option>
              {foreach name="cat_list" item="v1"}
              <option value="{$v1['id']}">{$v1['cname']}</option>
              {foreach name="v1['child']" item="v2"}
              <option value="{$v2['id']}">&nbsp;&nbsp;&nbsp;&nbsp;{$v2['cname']}</option>
              {/foreach}
              {/foreach}
            </select>
            <input type="hidden" name="path" value="0">
        </div>
      </div>
      <div class="form-group">
        <label for="is_visible" class="col-sm-1 control-label">是否可见:</label>
        <div class="col-sm-3">
          <select class="form-control" name="is_visible">
              <option value="1">可见</option>
              <option value="0">不可见</option>
            </select>
        </div>
      </div>
      <div class="form-group">
        <label for="keyword" class="col-sm-1 control-label">关键字:</label>
        <div class="col-sm-6">
          <input type="text" class="form-control" id="keyword" name="keyword" placeholder="分类的关键字,便于搜索">
        </div>
      </div>
      <div class="form-group">
        <label for="category_desc" class="col-sm-1 control-label">分类描述:</label>
        <div class="col-sm-6">
          <textarea class="form-control" rows="3" name="describe"></textarea>
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-offset-1 col-sm-11">
          <button type="submit" class="btn btn-default">提交</button>
        </div>
      </div>
    </form>
  </div>
</div>